package com.xiaoge.service.impl;

import com.xiaoge.entity.Person;
import com.xiaoge.mapper.PersonMapper;
import com.xiaoge.service.PersonService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 实现业务接口
 */
@Service
public class PersionServiceImpl implements PersonService {

    @Resource
    PersonMapper personMapper;

    @Override
    public List<Person> getAll() {
        return personMapper.getAll();
    }

    @Override
    public boolean addPerson(Person person) {
        return personMapper.addPerson(person)>0;
    }

    @Override
    public boolean delPerson(Integer id) {
        return personMapper.delPerson(id)>0;
    }

    @Override
    public boolean delsPerson(Integer[] arr) {
        return personMapper.delsPerson(arr)>0;
    }
}
